package com.Archive.firstWeek;

public class Base_Conversion {
    public static String trans1(int num, int radix) {
        if (radix == 2)
            return Integer.toBinaryString(num);
        else if (radix == 8)
            return Integer.toOctalString(num);
        else if (radix == 16)
            return Integer.toHexString(num);
        return null;
    }

    public static void main(String[] args) {
        System.out.println(Integer.toHexString(10));
    }
}
